<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{wfFlowTransBean.id}"/>
		<f:event type="preRenderView" listener="#{wfFlowTransBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Wf Flow Trans"/>

	<ui:define name="header">
		Wf Flow Trans
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty wfFlowTransBean.id}">
				Edit existing Wf Flow Trans
			</c:when>
			<c:otherwise>
				Create a new Wf Flow Trans
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="wfFlowTransBeanWfFlowTransFtNo" value="Ft No:"/>
				<h:panelGroup>
					<h:inputText id="wfFlowTransBeanWfFlowTransFtNo" required="true" value="#{wfFlowTransBean.wfFlowTrans.ftNo}"/>
					<h:message for="wfFlowTransBeanWfFlowTransFtNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="wfFlowTransBeanWfFlowTransHrEmp" value="Hr Emp:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{hrEmpBean.converter}" id="wfFlowTransBeanWfFlowTransHrEmp" value="#{wfFlowTransBean.wfFlowTrans.hrEmp}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{hrEmpBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="wfFlowTransBeanWfFlowTransHrEmp" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfFlowTransBeanWfFlowTransFtCode" value="Ft Code:"/>
				<h:panelGroup>
					<h:inputText id="wfFlowTransBeanWfFlowTransFtCode" maxLength="50" value="#{wfFlowTransBean.wfFlowTrans.ftCode}"/>
					<h:message for="wfFlowTransBeanWfFlowTransFtCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfFlowTransBeanWfFlowTransFtDescr" value="Ft Descr:"/>
				<h:panelGroup>
					<h:inputText id="wfFlowTransBeanWfFlowTransFtDescr" maxLength="500" value="#{wfFlowTransBean.wfFlowTrans.ftDescr}"/>
					<h:message for="wfFlowTransBeanWfFlowTransFtDescr" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfFlowTransBeanWfFlowTransFtCreatedDtm" value="Ft Created Dtm:"/>
				<h:panelGroup>
					<h:inputText id="wfFlowTransBeanWfFlowTransFtCreatedDtm" maxLength="19" value="#{wfFlowTransBean.wfFlowTrans.ftCreatedDtm}">
						<f:convertDateTime pattern="MMM d, yyyy hh:mm:ss a" type="both"/>
					</h:inputText>
					<h:message for="wfFlowTransBeanWfFlowTransFtCreatedDtm" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfFlowTransBeanWfFlowTransWfFlowTransLines" value="Wf Flow Trans Lines:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{wfFlowTransBean.wfFlowTrans.wfFlowTransLines}"/>
					<h:dataTable id="wfFlowTransBeanWfFlowTransWfFlowTransLines" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Wf Job Master"/>
							</f:facet>
							<h:link outcome="/wfFlowTransLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemWfJobMaster" value="#{forgeview:display(_item.wfJobMaster)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{wfJobMasterBean.converter}" id="wfFlowTransLineBeanAddWfJobMaster" value="#{wfFlowTransLineBean.add.wfJobMaster}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{wfJobMasterBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="wfFlowTransLineBeanAddWfJobMaster" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Wf Flow Status"/>
							</f:facet>
							<h:link outcome="/wfFlowTransLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemWfFlowStatus" value="#{forgeview:display(_item.wfFlowStatus)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{wfFlowStatusBean.converter}" id="wfFlowTransLineBeanAddWfFlowStatus" value="#{wfFlowTransLineBean.add.wfFlowStatus}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{wfFlowStatusBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="wfFlowTransLineBeanAddWfFlowStatus" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Wf Workstation"/>
							</f:facet>
							<h:link outcome="/wfFlowTransLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemWfWorkstation" value="#{forgeview:display(_item.wfWorkstation)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{wfWorkstationBean.converter}" id="wfFlowTransLineBeanAddWfWorkstation" value="#{wfFlowTransLineBean.add.wfWorkstation}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{wfWorkstationBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="wfFlowTransLineBeanAddWfWorkstation" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Hr Emp"/>
							</f:facet>
							<h:link outcome="/wfFlowTransLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemHrEmp" value="#{forgeview:display(_item.hrEmp)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{hrEmpBean.converter}" id="wfFlowTransLineBeanAddHrEmp" value="#{wfFlowTransLineBean.add.hrEmp}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{hrEmpBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="wfFlowTransLineBeanAddHrEmp" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Ft Flow Seq No"/>
							</f:facet>
							<h:link outcome="/wfFlowTransLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemFtFlowSeqNo" value="#{_item.ftFlowSeqNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="wfFlowTransLineBeanAddFtFlowSeqNo" value="#{wfFlowTransLineBean.add.ftFlowSeqNo}"/>
								<h:message for="wfFlowTransLineBeanAddFtFlowSeqNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(wfFlowTransLineBean.added)}" id="wfFlowTransBeanWfFlowTransWfFlowTransLinesAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{wfFlowTransLineBean.add.wfFlowTrans}" value="#{wfFlowTransBean.wfFlowTrans}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfFlowTransBeanWfFlowTransSdQuotations" value="Sd Quotations:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{wfFlowTransBean.wfFlowTrans.sdQuotations}"/>
					<h:dataTable id="wfFlowTransBeanWfFlowTransSdQuotations" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Qt No"/>
							</f:facet>
							<h:link outcome="/sdQuotation/view">
								<f:param name="id" value="#{_item.qtNo}"/>
								<h:outputText id="itemQtNo" value="#{_item.qtNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdQuotationBeanAddQtNo" value="#{sdQuotationBean.add.qtNo}"/>
								<h:message for="sdQuotationBeanAddQtNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Qt Code"/>
							</f:facet>
							<h:link outcome="/sdQuotation/view">
								<f:param name="id" value="#{_item.qtNo}"/>
								<h:outputText id="itemQtCode" value="#{_item.qtCode}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdQuotationBeanAddQtCode" maxLength="50" value="#{sdQuotationBean.add.qtCode}"/>
								<h:message for="sdQuotationBeanAddQtCode" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Qt Descr"/>
							</f:facet>
							<h:link outcome="/sdQuotation/view">
								<f:param name="id" value="#{_item.qtNo}"/>
								<h:outputText id="itemQtDescr" value="#{_item.qtDescr}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdQuotationBeanAddQtDescr" maxLength="100" value="#{sdQuotationBean.add.qtDescr}"/>
								<h:message for="sdQuotationBeanAddQtDescr" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Qt Date"/>
							</f:facet>
							<h:link outcome="/sdQuotation/view">
								<f:param name="id" value="#{_item.qtNo}"/>
								<h:outputText id="itemQtDate" value="#{_item.qtDate}">
									<f:convertDateTime type="date"/>
								</h:outputText>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdQuotationBeanAddQtDate" maxLength="10" value="#{sdQuotationBean.add.qtDate}">
									<f:convertDateTime type="date"/>
								</h:inputText>
								<h:message for="sdQuotationBeanAddQtDate" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Qt Discount Perc"/>
							</f:facet>
							<h:link outcome="/sdQuotation/view">
								<f:param name="id" value="#{_item.qtNo}"/>
								<h:outputText id="itemQtDiscountPerc" value="#{_item.qtDiscountPerc}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sdQuotationBeanAddQtDiscountPerc" value="#{sdQuotationBean.add.qtDiscountPerc}"/>
								<h:message for="sdQuotationBeanAddQtDiscountPerc" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sdQuotationBean.added)}" id="wfFlowTransBeanWfFlowTransSdQuotationsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sdQuotationBean.add.wfFlowTrans}" value="#{wfFlowTransBean.wfFlowTrans}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{wfFlowTransBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty wfFlowTransBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{wfFlowTransBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{wfFlowTransBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>